package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 班级表
 *
 * @author chenzh
 * @since 2023-08-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_class")
@Schema(name = "EduClass", title = "班级表", description = "班级表实体类")
public class EduClass extends Model<EduClass> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "classId", description = "班级主键")
    @TableId(value = "class_id", type = IdType.ASSIGN_ID)
    private Long classId;

    @Schema(name = "year", description = "年份")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "className", description = "班级名称")
    @TableField(value = "class_name")
    private String className;

    @Schema(name = "orderNumber", description = "预分班序号")
    @TableField(value = "order_number")
    private Integer orderNumber;

    @Schema(name = "adviserId", description = "班主任id")
    @TableField(value = "adviser_id")
    private Long adviserId;

    @Schema(name = "adviserName", description = "班主任姓名")
    @TableField(value = "adviser_name")
    private String adviserName;

    @Schema(name = "schoolId", description = "学校")
    @TableField(value = "school_id")
    private String schoolId;

    @Schema(name = "schoolName", description = "学校名称")
    @TableField(value = "school_name")
    private String schoolName;
    @Schema(name = "configTypeName", description = "招生计划类别")
    @TableField(value = "config_type_name")
    private String configTypeName;
    @Schema(name = "areaCode", description = "所属行政区划")
    @TableField(value = "area_code")
    private String areaCode;
    @Schema(name = "total", description = "总人数")
    @TableField(value = "total")
    private Integer total;
    @Schema(name = "schoolboy", description = "男生人数")
    @TableField(value = "schoolboy")
    private Integer schoolboy;
    @Schema(name = "schoolgirl", description = "女生人数")
    @TableField(value = "schoolgirl")
    private Integer schoolgirl;
    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", description = "逻辑删除标志 0 正常 1 删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.classId;
    }
}
